<!DOCTYPE html>
<html lang="zh-CN">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>教材版本对比分析系统</title>
    <script src="https://cdn.tailwindcss.com"></script>
    <link href="https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/css/font-awesome.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/chart.js@4.4.8/dist/chart.umd.min.js"></script>

    <!-- Tailwind 配置 -->
    <script>
        tailwind.config = {
            theme: {
                extend: {
                    colors: {
                        primary: '#165DFF',
                        secondary: '#36CBCB',
                        accent: '#FF7D00',
                        neutral: '#F5F7FA',
                        'neutral-dark': '#4E5969',
                        success: '#00B42A',
                        warning: '#FF7D00',
                        danger: '#F53F3F',
                        renjiao: '#4E72B7',
                        sujiao: '#E4A12D',
                        beishida: '#55A954',
                        hukejiao: '#C45A5A',
                    },
                    fontFamily: {
                        inter: ['Inter', 'system-ui', 'sans-serif'],
                    },
                }
            }
        }
    </script>

    <style type="text/tailwindcss">
        @layer utilities {
            .content-auto {
                content-visibility: auto;
            }
            .scrollbar-hide {
                -ms-overflow-style: none;
                scrollbar-width: none;
            }
            .scrollbar-hide::-webkit-scrollbar {
                display: none;
            }
            .text-shadow {
                text-shadow: 0 2px 4px rgba(0,0,0,0.1);
            }
            .tree-line {
                @apply border-l-2 border-dashed border-gray-200 ml-3 pl-4;
            }
            .diff-added {
                @apply bg-green-50 border-l-4 border-green-500;
            }
            .diff-removed {
                @apply bg-red-50 border-l-4 border-red-500;
            }
            .diff-modified {
                @apply bg-yellow-50 border-l-4 border-yellow-500;
            }
            .version-highlight {
                @apply font-medium px-1.5 py-0.5 rounded-sm;
            }
        }
    </style>
</head>

<body class="bg-gray-50 font-inter text-gray-800 min-h-screen flex flex-col">
    <!-- 顶部导航栏 -->
    <header class="bg-white shadow-sm sticky top-0 z-50 transition-all duration-300">
        <div class="container mx-auto px-0 py-3 flex items-center justify-between">
            <div class="flex items-center space-x-2">
                <button id="sidebar-toggle" class="lg:hidden text-gray-500 hover:text-primary transition-colors">
                    <i class="fa fa-bars text-xl"></i>
                </button>
                <h1 class="text-xl font-bold text-primary flex items-center">
                    <i class="fa fa-book mr-2"></i>
                    <span>睿途题库</span>
                </h1>
            </div>

            <div class="hidden md:flex items-center space-x-6">
                <!-- 控制面板 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-tachometer mr-1"></i> 控制面板
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div
                        class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-dashboard mr-2"></i> 仪表盘
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-chart-line mr-2"></i> 数据概览
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-tasks mr-2"></i> 任务管理
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 教材管理 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 font-medium border-b-2 border-primary pb-1 flex items-center">
                        <i class="fa fa-book mr-1"></i> 教材管理
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div
                        class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-list mr-2"></i> 版本管理
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-sitemap mr-2"></i> 章节管理
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-lightbulb-o mr-2"></i> 知识点管理
                            </a>
                            <a href="#" class="block px-4 py-2 text-sm text-primary bg-primary/10 font-medium">
                                <i class="fa fa-exchange mr-2"></i> 版本对比
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 题库管理 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-database mr-1"></i> 题库管理
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div
                        class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-question-circle mr-2"></i> 题目管理
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-tags mr-2"></i> 标签管理
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-filter mr-2"></i> 筛选规则
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-upload mr-2"></i> 批量导入
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 组卷系统 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-files-o mr-1"></i> 组卷系统
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div
                        class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-magic mr-2"></i> 智能组卷
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-edit mr-2"></i> 手动组卷
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-copy mr-2"></i> 试卷模板
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-history mr-2"></i> 历史试卷
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 数据分析 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-bar-chart mr-1"></i> 数据分析
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div
                        class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-chart-pie mr-2"></i> 学习分析
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-chart-bar mr-2"></i> 成绩统计
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-chart-line mr-2"></i> 趋势分析
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-file-text mr-2"></i> 报告生成
                            </a>
                        </div>
                    </div>
                </div>

                <!-- 系统设置 -->
                <div class="relative group">
                    <a href="#" class="text-gray-600 hover:text-primary transition-colors flex items-center">
                        <i class="fa fa-cog mr-1"></i> 系统设置
                        <i class="fa fa-angle-down ml-1 text-xs"></i>
                    </a>
                    <div
                        class="absolute top-full left-0 mt-1 w-48 bg-white shadow-lg rounded-lg border border-gray-200 opacity-0 invisible group-hover:opacity-100 group-hover:visible transition-all duration-200 z-50">
                        <div class="py-2">
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-users mr-2"></i> 用户管理
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-shield mr-2"></i> 权限设置
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-database mr-2"></i> 数据备份
                            </a>
                            <a href="#"
                                class="block px-4 py-2 text-sm text-gray-700 hover:bg-gray-50 hover:text-primary transition-colors">
                                <i class="fa fa-cogs mr-2"></i> 系统配置
                            </a>
                        </div>
                    </div>
                </div>
            </div>

            <div class="flex items-center space-x-4">
                <div class="relative">
                    <input type="text" placeholder="搜索教材、章节或知识点..."
                        class="pl-10 pr-4 py-2 rounded-full bg-gray-100 focus:outline-none focus:ring-2 focus:ring-primary/20 transition-all w-40 lg:w-64">
                    <i class="fa fa-search absolute left-3 top-1/2 transform -translate-y-1/2 text-gray-400"></i>
                </div>

                <div class="relative">
                    <button class="text-gray-500 hover:text-primary transition-colors">
                        <i class="fa fa-bell text-xl"></i>
                        <span
                            class="absolute -top-1 -right-1 bg-danger text-white text-xs rounded-full h-4 w-4 flex items-center justify-center">3</span>
                    </button>
                </div>

                <div class="flex items-center space-x-2 cursor-pointer group">
                    <img src="https://picsum.photos/id/64/40/40" alt="用户头像"
                        class="w-8 h-8 rounded-full object-cover border-2 border-transparent group-hover:border-primary transition-all">
                    <span class="hidden md:inline font-medium">张老师</span>
                    <i class="fa fa-angle-down text-gray-400 group-hover:text-primary transition-colors"></i>
                </div>
            </div>
        </div>
    </header>



    <!-- 主内容区 -->
    <main class="flex-1 overflow-y-auto bg-gray-50 p-4 lg:p-6">
        <div class="container mx-auto">
            <!-- 面包屑导航 -->
            <div class="flex items-center text-sm text-gray-500 mb-4">
                <a href="#" class="hover:text-primary">首页</a>
                <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                <a href="#" class="hover:text-primary">教材版本管理</a>
                <i class="fa fa-angle-right mx-2 text-gray-300"></i>
                <span class="text-primary font-medium">版本对比分析</span>
            </div>

            <!-- 页面标题 -->
            <div class="flex flex-col md:flex-row md:items-center justify-between mb-6">
                <div>
                    <h2 class="text-[clamp(1.5rem,3vw,2rem)] font-bold text-gray-800">教材版本对比分析</h2>
                    <p class="text-gray-500 mt-1">深度对比不同教材版本的知识点差异，支持智能映射与迁移</p>
                </div>

                <div class="flex space-x-3 mt-4 md:mt-0">
                    <button
                        class="bg-white border border-gray-300 text-gray-700 px-4 py-2 rounded-lg hover:bg-gray-50 transition-colors flex items-center">
                        <i class="fa fa-download mr-2"></i> 导出报告
                    </button>
                    <button
                        class="bg-primary text-white px-4 py-2 rounded-lg hover:bg-primary/90 transition-colors flex items-center">
                        <i class="fa fa-refresh mr-2"></i> 重新对比
                    </button>
                </div>
            </div>

            <!-- 对比配置区 -->
            <div class="bg-white rounded-xl shadow-sm p-6 mb-6">
                <div class="flex flex-col md:flex-row md:items-center justify-between mb-4">
                    <h3 class="font-bold text-lg">对比配置</h3>
                    <div class="flex space-x-2 mt-2 md:mt-0">
                        <span class="text-xs bg-primary/10 text-primary px-2 py-1 rounded-full">智能映射</span>
                        <span class="text-xs bg-green-100 text-green-600 px-2 py-1 rounded-full">自动同步</span>
                    </div>
                </div>

                <div class="grid grid-cols-1 md:grid-cols-4 gap-4">
                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">学科</label>
                        <select
                            class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                            <option selected>高中数学</option>
                            <option>高中物理</option>
                            <option>高中化学</option>
                            <option>高中生物</option>
                        </select>
                    </div>

                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">教材版本</label>
                        <div class="flex flex-wrap gap-2">
                            <span class="version-highlight bg-renjiao/20 text-renjiao border border-renjiao/30">人教版
                                2023</span>
                            <span class="version-highlight bg-sujiao/20 text-sujiao border border-sujiao/30">苏教版
                                2022</span>
                            <span class="version-highlight bg-beishida/20 text-beishida border border-beishida/30">北师大版
                                2023</span>
                            <button
                                class="text-gray-400 hover:text-gray-600 border border-dashed border-gray-300 px-2 py-1 rounded">
                                <i class="fa fa-plus"></i>
                            </button>
                        </div>
                    </div>

                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">册别</label>
                        <select
                            class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                            <option>必修第一册</option>
                            <option>必修第二册</option>
                            <option>必修第三册</option>
                            <option>选择性必修第一册</option>
                            <option>选择性必修第二册</option>
                        </select>
                    </div>

                    <div>
                        <label class="block text-sm font-medium text-gray-700 mb-1">章节</label>
                        <select
                            class="w-full appearance-none bg-gray-50 border border-gray-200 rounded-lg px-3 py-2 pr-8 focus:outline-none focus:ring-2 focus:ring-primary/20 focus:border-primary">
                            <option selected>第一章 集合与常用逻辑用语</option>
                            <option>第二章 一元二次函数、方程和不等式</option>
                            <option>第三章 函数概念与性质</option>
                            <option>第四章 指数函数与对数函数</option>
                        </select>
                    </div>
                </div>
            </div>

            <!-- 对比概览统计 -->
            <div class="grid grid-cols-1 md:grid-cols-4 gap-4 mb-6">
                <div class="bg-white rounded-xl shadow-sm p-4 border-l-4 border-green-500">
                    <div class="flex items-center justify-between">
                        <div>
                            <h3 class="font-medium text-gray-700">新增知识点</h3>
                            <p class="text-sm text-gray-500 mt-1">目标版本新增</p>
                        </div>
                        <span class="text-green-500 text-2xl font-bold">8</span>
                    </div>
                </div>

                <div class="bg-white rounded-xl shadow-sm p-4 border-l-4 border-red-500">
                    <div class="flex items-center justify-between">
                        <div>
                            <h3 class="font-medium text-gray-700">删除知识点</h3>
                            <p class="text-sm text-gray-500 mt-1">目标版本删除</p>
                        </div>
                        <span class="text-red-500 text-2xl font-bold">3</span>
                    </div>
                </div>

                <div class="bg-white rounded-xl shadow-sm p-4 border-l-4 border-yellow-500">
                    <div class="flex items-center justify-between">
                        <div>
                            <h3 class="font-medium text-gray-700">修改知识点</h3>
                            <p class="text-sm text-gray-500 mt-1">内容有调整</p>
                        </div>
                        <span class="text-yellow-500 text-2xl font-bold">12</span>
                    </div>
                </div>

                <div class="bg-white rounded-xl shadow-sm p-4 border-l-4 border-primary">
                    <div class="flex items-center justify-between">
                        <div>
                            <h3 class="font-medium text-gray-700">匹配度</h3>
                            <p class="text-sm text-gray-500 mt-1">知识点对应</p>
                        </div>
                        <span class="text-primary text-2xl font-bold">85%</span>
                    </div>
                </div>
            </div>



            <!-- 详细对比内容 -->
            <div class="grid grid-cols-1 lg:grid-cols-3 gap-6">
                <!-- 左侧：章节树对比 -->
                <div class="lg:col-span-2">
                    <div class="bg-white rounded-xl shadow-sm p-6 mb-6">
                        <div class="flex items-center justify-between mb-4">
                            <h3 class="font-bold text-lg">章节结构对比</h3>
                            <div class="flex space-x-2">
                                <button id="expand-all"
                                    class="text-xs bg-primary/10 text-primary px-3 py-1 rounded-lg hover:bg-primary/20 transition-colors">
                                    <i class="fa fa-expand mr-1"></i> 展开全部
                                </button>
                                <button id="collapse-all"
                                    class="text-xs bg-gray-100 text-gray-600 px-3 py-1 rounded-lg hover:bg-gray-200 transition-colors">
                                    <i class="fa fa-compress mr-1"></i> 收起全部
                                </button>
                            </div>
                        </div>

                        <div class="grid grid-cols-1 md:grid-cols-2 gap-6">
                            <!-- 源版本章节树 -->
                            <div>
                                <h4 class="font-medium text-gray-700 mb-3 flex items-center">
                                    <span class="w-3 h-3 bg-renjiao rounded-full mr-2"></span>
                                    人教版 2023版
                                </h4>
                                <div class="space-y-2 max-h-96 overflow-y-auto">
                                    <div class="chapter-item diff-added p-2 rounded-lg">
                                        <div class="flex items-center justify-between cursor-pointer">
                                            <div class="flex items-center">
                                                <i class="fa fa-book text-renjiao mr-2"></i>
                                                <span class="text-sm">第一章 集合与常用逻辑用语</span>
                                            </div>
                                            <span
                                                class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded-full">4节</span>
                                        </div>
                                        <div class="pl-6 mt-2 space-y-1">
                                            <div class="flex items-center justify-between text-xs">
                                                <span>1.1 集合的含义与表示</span>
                                                <span class="text-green-600">新增</span>
                                            </div>
                                            <div class="flex items-center justify-between text-xs">
                                                <span>1.2 集合间的基本关系</span>
                                                <span class="text-gray-500">一致</span>
                                            </div>
                                            <div class="flex items-center justify-between text-xs">
                                                <span>1.3 集合的基本运算</span>
                                                <span class="text-yellow-600">修改</span>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="chapter-item p-2 rounded-lg">
                                        <div class="flex items-center justify-between cursor-pointer">
                                            <div class="flex items-center">
                                                <i class="fa fa-book text-renjiao mr-2"></i>
                                                <span class="text-sm">第二章 一元二次函数、方程和不等式</span>
                                            </div>
                                            <span
                                                class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">3节</span>
                                        </div>
                                    </div>
                                    <!-- 新增扩展章节：人教版 第三章 -->
                                    <div class="chapter-item p-2 rounded-lg bg-green-50 mt-2">
                                        <div class="flex items-center justify-between cursor-pointer">
                                            <div class="flex items-center">
                                                <i class="fa fa-book text-renjiao mr-2"></i>
                                                <span class="text-sm font-bold">第三章 指数函数与对数函数</span>
                                            </div>
                                            <span
                                                class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded-full">2节</span>
                                        </div>
                                        <div class="pl-6 mt-2 space-y-1">
                                            <div class="flex items-center justify-between text-xs">
                                                <span>3.1 指数函数的性质</span>
                                                <span class="text-green-600">新增</span>
                                            </div>
                                            <div class="flex items-center justify-between text-xs">
                                                <span>3.2 对数函数的性质</span>
                                                <span class="text-gray-500">一致</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>

                            <!-- 目标版本章节树 -->
                            <div>
                                <h4 class="font-medium text-gray-700 mb-3 flex items-center">
                                    <span class="w-3 h-3 bg-sujiao rounded-full mr-2"></span>
                                    苏教版 2022版
                                </h4>
                                <div class="space-y-2 max-h-96 overflow-y-auto">
                                    <div class="chapter-item diff-removed p-2 rounded-lg">
                                        <div class="flex items-center justify-between cursor-pointer">
                                            <div class="flex items-center">
                                                <i class="fa fa-book text-sujiao mr-2"></i>
                                                <span class="text-sm">第一章 集合与常用逻辑用语</span>
                                            </div>
                                            <span
                                                class="text-xs bg-red-100 text-red-600 px-2 py-0.5 rounded-full">3节</span>
                                        </div>
                                        <div class="pl-6 mt-2 space-y-1">
                                            <div class="flex items-center justify-between text-xs">
                                                <span>1.1 集合的概念</span>
                                                <span class="text-red-600">删除</span>
                                            </div>
                                            <div class="flex items-center justify-between text-xs">
                                                <span>1.2 集合间的基本关系</span>
                                                <span class="text-gray-500">一致</span>
                                            </div>
                                            <div class="flex items-center justify-between text-xs">
                                                <span>1.3 集合的运算</span>
                                                <span class="text-yellow-600">修改</span>
                                            </div>
                                        </div>
                                    </div>

                                    <div class="chapter-item p-2 rounded-lg">
                                        <div class="flex items-center justify-between cursor-pointer">
                                            <div class="flex items-center">
                                                <i class="fa fa-book text-sujiao mr-2"></i>
                                                <span class="text-sm">第二章 一元二次函数、方程和不等式</span>
                                            </div>
                                            <span
                                                class="text-xs bg-blue-100 text-blue-600 px-2 py-0.5 rounded-full">3节</span>
                                        </div>
                                    </div>
                                    <!-- 新增扩展章节：苏教版 第三章 -->
                                    <div class="chapter-item p-2 rounded-lg bg-red-50 mt-2">
                                        <div class="flex items-center justify-between cursor-pointer">
                                            <div class="flex items-center">
                                                <i class="fa fa-book text-sujiao mr-2"></i>
                                                <span class="text-sm font-bold">第三章 指数函数与对数函数</span>
                                            </div>
                                            <span
                                                class="text-xs bg-red-100 text-red-600 px-2 py-0.5 rounded-full">2节</span>
                                        </div>
                                        <div class="pl-6 mt-2 space-y-1">
                                            <div class="flex items-center justify-between text-xs">
                                                <span>3.1 指数函数的应用</span>
                                                <span class="text-yellow-600">修改</span>
                                            </div>
                                            <div class="flex items-center justify-between text-xs">
                                                <span>3.2 对数函数的性质</span>
                                                <span class="text-gray-500">一致</span>
                                            </div>
                                        </div>
                                    </div>
                                    <!-- 新增扩展章节：苏教版 第四章（删除示例） -->
                                    <div class="chapter-item p-2 rounded-lg bg-red-50 mt-2">
                                        <div class="flex items-center justify-between cursor-pointer">
                                            <div class="flex items-center">
                                                <i class="fa fa-book text-sujiao mr-2"></i>
                                                <span class="text-sm font-bold">第四章 排列与组合</span>
                                            </div>
                                            <span
                                                class="text-xs bg-red-100 text-red-600 px-2 py-0.5 rounded-full">1节</span>
                                        </div>
                                        <div class="pl-6 mt-2 space-y-1">
                                            <div class="flex items-center justify-between text-xs">
                                                <span>4.1 排列组合基础</span>
                                                <span class="text-red-600">删除</span>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 知识点详细对比 -->
                    <div class="bg-white rounded-xl shadow-sm p-6 mb-6">
                        <div class="flex items-center justify-between mb-4">
                            <h3 class="font-bold text-lg">知识点详细对比</h3>
                            <div class="flex space-x-2">
                                <button
                                    class="text-xs bg-primary/10 text-primary px-3 py-1 rounded-lg hover:bg-primary/20 transition-colors">
                                    <i class="fa fa-filter mr-1"></i> 筛选
                                </button>
                                <button
                                    class="text-xs bg-gray-100 text-gray-600 px-3 py-1 rounded-lg hover:bg-gray-200 transition-colors">
                                    <i class="fa fa-sort mr-1"></i> 排序
                                </button>
                            </div>
                        </div>

                        <div class="overflow-x-auto">
                            <table class="min-w-full divide-y divide-gray-200">
                                <thead>
                                    <tr>
                                        <th
                                            class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                                            知识点</th>
                                        <th
                                            class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                                            人教版 2023版</th>
                                        <th
                                            class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                                            苏教版 2022版</th>
                                        <th
                                            class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                                            差异类型</th>
                                        <th
                                            class="px-4 py-3 bg-gray-50 text-left text-xs font-medium text-gray-500 uppercase tracking-wider">
                                            操作</th>
                                    </tr>
                                </thead>
                                <tbody class="bg-white divide-y divide-gray-200">
                                    <tr class="diff-added">
                                        <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">集合的定义
                                        </td>
                                        <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">必修一 第一章 第1节</td>
                                        <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">-</td>
                                        <td class="px-4 py-4 whitespace-nowrap">
                                            <span
                                                class="text-green-600 text-xs bg-green-50 px-2 py-1 rounded-full">新增</span>
                                        </td>
                                        <td class="px-4 py-4 whitespace-nowrap">
                                            <button class="text-primary hover:text-primary/80 text-sm">映射</button>
                                        </td>
                                    </tr>
                                    <tr class="diff-removed">
                                        <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">集合的概念
                                        </td>
                                        <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">-</td>
                                        <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">必修一 第一章 第1节</td>
                                        <td class="px-4 py-4 whitespace-nowrap">
                                            <span
                                                class="text-red-600 text-xs bg-red-50 px-2 py-1 rounded-full">删除</span>
                                        </td>
                                        <td class="px-4 py-4 whitespace-nowrap">
                                            <button class="text-primary hover:text-primary/80 text-sm">保留</button>
                                        </td>
                                    </tr>
                                    <tr class="diff-modified">
                                        <td class="px-4 py-4 whitespace-nowrap text-sm font-medium text-gray-900">集合的运算
                                        </td>
                                        <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">包含并集、交集、补集</td>
                                        <td class="px-4 py-4 whitespace-nowrap text-sm text-gray-500">增加差集运算</td>
                                        <td class="px-4 py-4 whitespace-nowrap">
                                            <span
                                                class="text-yellow-600 text-xs bg-yellow-50 px-2 py-1 rounded-full">修改</span>
                                        </td>
                                        <td class="px-4 py-4 whitespace-nowrap">
                                            <button class="text-primary hover:text-primary/80 text-sm">同步</button>
                                        </td>
                                    </tr>
                                </tbody>
                            </table>
                        </div>
                    </div>

                    <!-- 迁移建议 -->
                    <div class="bg-white rounded-xl shadow-sm p-6">
                        <h3 class="font-bold text-lg mb-4">智能迁移建议</h3>
                        <div class="space-y-4">
                            <div class="border border-gray-200 rounded-lg p-4">
                                <div class="flex items-center justify-between mb-2">
                                    <h4 class="font-medium text-gray-800">知识点映射</h4>
                                    <span
                                        class="text-xs bg-green-100 text-green-600 px-2 py-0.5 rounded-full">自动完成</span>
                                </div>
                                <p class="text-sm text-gray-600 mb-3">系统已自动完成85%的知识点映射，剩余15%需要人工确认。</p>
                                <div class="flex space-x-2">
                                    <button
                                        class="text-xs bg-primary text-white px-3 py-1 rounded-lg hover:bg-primary/90 transition-colors">
                                        查看详情
                                    </button>
                                    <button
                                        class="text-xs bg-gray-100 text-gray-600 px-3 py-1 rounded-lg hover:bg-gray-200 transition-colors">
                                        手动调整
                                    </button>
                                </div>
                            </div>

                            <div class="border border-gray-200 rounded-lg p-4">
                                <div class="flex items-center justify-between mb-2">
                                    <h4 class="font-medium text-gray-800">试题迁移</h4>
                                    <span
                                        class="text-xs bg-yellow-100 text-yellow-600 px-2 py-0.5 rounded-full">待处理</span>
                                </div>
                                <p class="text-sm text-gray-600 mb-3">检测到156道试题需要迁移，其中23道需要重新分类。</p>
                                <div class="flex space-x-2">
                                    <button
                                        class="text-xs bg-primary text-white px-3 py-1 rounded-lg hover:bg-primary/90 transition-colors">
                                        开始迁移
                                    </button>
                                    <button
                                        class="text-xs bg-gray-100 text-gray-600 px-3 py-1 rounded-lg hover:bg-gray-200 transition-colors">
                                        预览
                                    </button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>

                <!-- 右侧：统计图表 -->
                <div class="lg:col-span-1 space-y-6">
                    <!-- 差异统计图表 -->
                    <div class="bg-white rounded-xl shadow-sm p-6">
                        <h3 class="font-bold text-lg mb-4">差异统计</h3>
                        <div class="h-64">
                            <canvas id="diffChart"></canvas>
                        </div>
                    </div>

                    <!-- 匹配度分析 -->
                    <div class="bg-white rounded-xl shadow-sm p-6">
                        <h3 class="font-bold text-lg mb-4">匹配度分析</h3>
                        <div class="space-y-4">
                            <div>
                                <div class="flex justify-between text-sm mb-1">
                                    <span>完全匹配</span>
                                    <span class="font-medium">65%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-green-500 h-2 rounded-full" style="width: 65%"></div>
                                </div>
                            </div>

                            <div>
                                <div class="flex justify-between text-sm mb-1">
                                    <span>部分匹配</span>
                                    <span class="font-medium">20%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-yellow-500 h-2 rounded-full" style="width: 20%"></div>
                                </div>
                            </div>

                            <div>
                                <div class="flex justify-between text-sm mb-1">
                                    <span>无匹配</span>
                                    <span class="font-medium">15%</span>
                                </div>
                                <div class="w-full bg-gray-200 rounded-full h-2">
                                    <div class="bg-red-500 h-2 rounded-full" style="width: 15%"></div>
                                </div>
                            </div>
                        </div>
                    </div>

                    <!-- 快速操作 -->
                    <div class="bg-white rounded-xl shadow-sm p-6">
                        <h3 class="font-bold text-lg mb-4">快速操作</h3>
                        <div class="space-y-3">
                            <button
                                class="w-full py-2.5 bg-primary text-white rounded-lg hover:bg-primary/90 transition-colors flex items-center justify-center">
                                <i class="fa fa-magic mr-2"></i> 一键迁移
                            </button>

                            <button
                                class="w-full py-2.5 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors flex items-center justify-center">
                                <i class="fa fa-download mr-2"></i> 导出报告
                            </button>

                            <button
                                class="w-full py-2.5 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors flex items-center justify-center">
                                <i class="fa fa-share-alt mr-2"></i> 分享对比
                            </button>

                            <button
                                class="w-full py-2.5 bg-gray-100 text-gray-700 rounded-lg hover:bg-gray-200 transition-colors flex items-center justify-center">
                                <i class="fa fa-history mr-2"></i> 历史记录
                            </button>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 对比分析建议区 -->
            <div class="mb-8">
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="font-bold text-lg">对比分析建议</h3>
                        <a href="#" class="text-primary text-sm flex items-center hover:underline"><i
                                class="fa fa-edit mr-1"></i>添加建议</a>
                    </div>
                    <div class="space-y-4">
                        <div class="flex items-start bg-blue-50 rounded-lg p-4">
                            <i class="fa fa-lightbulb-o text-blue-500 text-2xl mr-3 mt-1"></i>
                            <div>
                                <div class="font-bold text-blue-700 mb-1">教学重点建议</div>
                                <div class="text-blue-900 text-sm">
                                    人教版对集合基本概念的讲解最为详细，建议在引入集合概念时以人教版为主要参考，结合北师大版对集合论历史的介绍，增加学生的学习兴趣。</div>
                            </div>
                        </div>
                        <div class="flex items-start bg-green-50 rounded-lg p-4">
                            <i class="fa fa-check-circle text-green-500 text-2xl mr-3 mt-1"></i>
                            <div>
                                <div class="font-bold text-green-700 mb-1">版本优劣利用</div>
                                <div class="text-green-900 text-sm">
                                    北师大版对集合表示方法的讲解更全面，尤其是递归定义法和特征函数法，适合对数学有较高兴趣的学生拓展学习。苏教版对区间表示法的强调值得借鉴，这对后续函数学习有帮助。
                                </div>
                            </div>
                        </div>
                        <div class="flex items-start bg-yellow-50 rounded-lg p-4">
                            <i class="fa fa-exclamation-triangle text-yellow-500 text-2xl mr-3 mt-1"></i>
                            <div>
                                <div class="font-bold text-yellow-700 mb-1">教学难点提示</div>
                                <div class="text-yellow-900 text-sm">
                                    集合间的关系是学生理解的难点，北师大版从理论角度的讲解虽深入，但对普通学生可能难度较大。建议结合人教版的直观讲解和苏教版的实例，帮助学生掌握。</div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 资源推荐区 -->
            <div class="mb-8">
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <div class="flex items-center justify-between mb-4">
                        <h3 class="font-bold text-lg">资源推荐</h3>
                        <a href="#" class="text-primary text-sm flex items-center hover:underline"><i
                                class="fa fa-plus mr-1"></i>添加资源</a>
                    </div>
                    <div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-4">
                        <!-- 资源1 -->
                        <div class="flex items-start bg-gray-50 rounded-lg p-4 border border-gray-100">
                            <i class="fa fa-file-pdf-o text-red-500 text-2xl mr-3 mt-1"></i>
                            <div>
                                <div class="font-bold text-gray-800 mb-1">集合与常用逻辑用语（人教版）课件</div>
                                <div class="text-gray-600 text-sm mb-2">PPT课件，适合课堂讲解和复习使用。</div>
                                <a href="#" class="text-primary text-xs hover:underline"><i
                                        class="fa fa-download mr-1"></i>下载</a>
                            </div>
                        </div>
                        <!-- 资源2 -->
                        <div class="flex items-start bg-gray-50 rounded-lg p-4 border border-gray-100">
                            <i class="fa fa-video-camera text-purple-500 text-2xl mr-3 mt-1"></i>
                            <div>
                                <div class="font-bold text-gray-800 mb-1">集合概念教学视频（北师大版）</div>
                                <div class="text-gray-600 text-sm mb-2">名师讲解，深入浅出，适合课前预习和课后巩固。</div>
                                <a href="#" class="text-primary text-xs hover:underline"><i
                                        class="fa fa-play-circle mr-1"></i>在线观看</a>
                            </div>
                        </div>
                        <!-- 资源3 -->
                        <div class="flex items-start bg-gray-50 rounded-lg p-4 border border-gray-100">
                            <i class="fa fa-file-text-o text-green-500 text-2xl mr-3 mt-1"></i>
                            <div>
                                <div class="font-bold text-gray-800 mb-1">集合与区间练习题（苏教版）</div>
                                <div class="text-gray-600 text-sm mb-2">精选练习题，含答案解析，适合课后作业。</div>
                                <a href="#" class="text-primary text-xs hover:underline"><i
                                        class="fa fa-download mr-1"></i>下载</a>
                            </div>
                        </div>
                    </div>
                </div>
            </div>

            <!-- 教师交流区域 -->
            <div class="mt-8">
                <div class="bg-white rounded-xl shadow-sm p-6">
                    <h3 class="font-bold text-lg mb-6">教师交流讨论</h3>
                    <!-- 评论列表 -->
                    <div class="space-y-8">
                        <!-- 一级评论1 -->
                        <div>
                            <div class="flex items-start space-x-3">
                                <img src="https://picsum.photos/id/101/40/40"
                                    class="w-10 h-10 rounded-full object-cover" />
                                <div class="flex-1">
                                    <div class="flex items-center space-x-2 mb-1">
                                        <span class="font-medium text-gray-900">王老师</span>
                                        <span class="text-xs text-gray-500">3天前</span>
                                    </div>
                                    <div class="text-gray-800 mb-2">
                                        我认为人教版对集合概念的引入更符合学生的认知规律，特别是对元素三大特性的强调非常到位。在实际教学中，我会结合苏教版的区间表示法，因为这对后续学习函数定义域很有帮助。
                                    </div>
                                    <div class="flex items-center space-x-4 text-xs text-gray-500 mb-2">
                                        <span><i class="fa fa-thumbs-up mr-1"></i>24</span>
                                        <span class="cursor-pointer hover:text-primary"><i
                                                class="fa fa-comment mr-1"></i>回复</span>
                                        <span class="cursor-pointer hover:text-primary"><i
                                                class="fa fa-star-o mr-1"></i>收藏</span>
                                    </div>
                                    <!-- 回复输入框（默认隐藏，点击回复按钮显示） -->
                                    <div class="hidden mt-2" id="reply-box-1">
                                        <textarea rows="2"
                                            class="w-full border border-gray-200 rounded-lg p-2 text-sm mb-2"
                                            placeholder="回复王老师..."></textarea>
                                        <div class="flex justify-end">
                                            <button
                                                class="bg-primary text-white px-4 py-1.5 rounded-lg text-sm flex items-center"><i
                                                    class="fa fa-paper-plane mr-1"></i>发布回复</button>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- 一级评论2 -->
                        <div>
                            <div class="flex items-start space-x-3">
                                <img src="https://picsum.photos/id/102/40/40"
                                    class="w-10 h-10 rounded-full object-cover" />
                                <div class="flex-1">
                                    <div class="flex items-center space-x-2 mb-1">
                                        <span class="font-medium text-gray-900">张老师</span>
                                        <span class="text-xs text-gray-500">1周前</span>
                                    </div>
                                    <div class="text-gray-800 mb-2">
                                        北师大版对集合论历史的介绍很有价值，能帮助学生理解数学概念的发展过程。不过对于基础薄弱的学生，可能会觉得内容偏难。建议分层教学，对学有余力的学生推荐北师大版的拓展内容。
                                    </div>
                                    <div class="flex items-center space-x-4 text-xs text-gray-500 mb-2">
                                        <span><i class="fa fa-thumbs-up mr-1"></i>18</span>
                                        <span class="cursor-pointer hover:text-primary"><i
                                                class="fa fa-comment mr-1"></i>回复</span>
                                        <span class="cursor-pointer hover:text-primary"><i
                                                class="fa fa-star-o mr-1"></i>收藏</span>
                                    </div>
                                    <!-- 二级评论列表 -->
                                    <div class="ml-10 mt-2 space-y-4">
                                        <!-- 二级评论1 -->
                                        <div class="flex items-start space-x-2">
                                            <img src="https://picsum.photos/id/103/32/32"
                                                class="w-8 h-8 rounded-full object-cover" />
                                            <div class="flex-1">
                                                <div class="flex items-center space-x-2 mb-1">
                                                    <span class="font-medium text-gray-900 text-sm">李老师</span>
                                                    <span class="text-xs text-gray-500">6天前</span>
                                                </div>
                                                <div class="text-gray-800 text-sm mb-1">
                                                    同意您的观点。我在教学中也采用了类似的分层策略，效果不错。特别是对于数学竞赛生，北师大版的递归定义法和特征函数法对他们很有启发。
                                                </div>
                                                <div class="flex items-center space-x-4 text-xs text-gray-500">
                                                    <span class="cursor-pointer hover:text-primary"><i
                                                            class="fa fa-comment mr-1"></i>回复</span>
                                                </div>
                                                <!-- 回复输入框（默认隐藏，点击回复按钮显示） -->
                                                <div class="hidden mt-2" id="reply-box-2-1">
                                                    <textarea rows="2"
                                                        class="w-full border border-gray-200 rounded-lg p-2 text-sm mb-2"
                                                        placeholder="回复李老师..."></textarea>
                                                    <div class="flex justify-end">
                                                        <button
                                                            class="bg-primary text-white px-4 py-1.5 rounded-lg text-sm flex items-center"><i
                                                                class="fa fa-paper-plane mr-1"></i>发布回复</button>
                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        <!-- 一级评论3 -->
                        <div>
                            <div class="flex items-start space-x-3">
                                <img src="https://picsum.photos/id/104/40/40"
                                    class="w-10 h-10 rounded-full object-cover" />
                                <div class="flex-1">
                                    <div class="flex items-center space-x-2 mb-1">
                                        <span class="font-medium text-gray-900">刘老师</span>
                                        <span class="text-xs text-gray-500">2周前</span>
                                    </div>
                                    <div class="text-gray-800 mb-2">
                                        苏教版对集合间不相关关系的强调很有特色，这对后续概率学习中互斥事件的理解很有帮助。建议在教学中提前做好衔接铺垫，让学生建立知识间的联系。</div>
                                    <div class="flex items-center space-x-4 text-xs text-gray-500 mb-2">
                                        <span><i class="fa fa-thumbs-up mr-1"></i>12</span>
                                        <span class="cursor-pointer hover:text-primary"><i
                                                class="fa fa-comment mr-1"></i>回复</span>
                                        <span class="cursor-pointer hover:text-primary"><i
                                                class="fa fa-star-o mr-1"></i>收藏</span>
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <!-- 评论输入框 -->
                    <div class="mt-8 border-t pt-6">
                        <div class="flex items-start space-x-3">
                            <img src="https://picsum.photos/id/105/40/40" class="w-10 h-10 rounded-full object-cover" />
                            <div class="flex-1">
                                <textarea rows="3" class="w-full border border-gray-200 rounded-lg p-3 text-sm mb-2"
                                    placeholder="分享您对这些教材版本的使用经验和教学建议..."></textarea>
                                <div class="flex justify-end">
                                    <button
                                        class="bg-primary text-white px-6 py-2 rounded-lg text-sm flex items-center"><i
                                            class="fa fa-paper-plane mr-1"></i>发布评论</button>
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>


    <!-- 页脚 -->
    <footer class="bg-white border-t border-gray-200 py-4">
        <div class="container mx-auto px-4">
            <div class="flex flex-col md:flex-row justify-between items-center">
                <div class="text-center md:text-left mb-4 md:mb-0">
                    <p class="text-sm text-gray-500">© 2025 教材资源管理系统. 保留所有权利.</p>
                </div>
                <div class="flex space-x-6">
                    <a href="#" class="text-gray-500 hover:text-primary transition-colors">
                        <i class="fa fa-question-circle mr-1"></i> 帮助中心
                    </a>
                    <a href="#" class="text-gray-500 hover:text-primary transition-colors">
                        <i class="fa fa-file-text-o mr-1"></i> 使用条款
                    </a>
                    <a href="#" class="text-gray-500 hover:text-primary transition-colors">
                        <i class="fa fa-shield mr-1"></i> 隐私政策
                    </a>
                </div>
            </div>
        </div>
    </footer>

    <!-- JavaScript -->
    <script>
        // 侧边栏切换
        document.getElementById('sidebar-toggle').addEventListener('click', function () {
            const sidebar = document.getElementById('sidebar');
            if (sidebar) sidebar.classList.toggle('-translate-x-full');
        });

        // 章节展开/收起
        document.querySelectorAll('.chapter-item > div:first-child').forEach(item => {
            item.addEventListener('click', function () {
                const content = this.nextElementSibling;
                if (!content) return;
                content.classList.toggle('hidden');
                // 可根据实际情况添加icon切换
            });
        });

        // 展开/收起所有章节
        document.getElementById('expand-all')?.addEventListener('click', function () {
            document.querySelectorAll('.chapter-item > div:first-child').forEach(item => {
                const content = item.nextElementSibling;
                if (content) content.classList.remove('hidden');
            });
        });
        document.getElementById('collapse-all')?.addEventListener('click', function () {
            document.querySelectorAll('.chapter-item > div:first-child').forEach(item => {
                const content = item.nextElementSibling;
                if (content) content.classList.add('hidden');
            });
        });

        // 导航栏滚动效果
        window.addEventListener('scroll', function () {
            const header = document.querySelector('header');
            if (window.scrollY > 10) {
                header.classList.add('shadow-md');
                header.classList.remove('shadow-sm');
            } else {
                header.classList.remove('shadow-md');
                header.classList.add('shadow-sm');
            }
        });

        // 差异统计图表
        const ctx = document.getElementById('diffChart')?.getContext('2d');
        if (ctx) {
            new Chart(ctx, {
                type: 'doughnut',
                data: {
                    labels: ['新增', '删除', '修改', '一致'],
                    datasets: [{
                        data: [8, 3, 12, 45],
                        backgroundColor: [
                            '#ef4444',
                            '#10b981',
                            '#f59e0b',
                            '#165DFF'
                        ],
                        borderWidth: 0
                    }]
                },
                options: {
                    responsive: true,
                    maintainAspectRatio: false,
                    plugins: {
                        legend: {
                            position: 'bottom',
                            labels: {
                                boxWidth: 12,
                                padding: 15
                            }
                        },
                        tooltip: {
                            callbacks: {
                                label: function (context) {
                                    return `${context.label}: ${context.raw}个`;
                                }
                            }
                        }
                    },
                    cutout: '70%'
                }
            });
        }
    </script>
</body>

</html>
